<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="Bookmark" href="/favicon.ico">
	<link rel="Shortcut Icon" href="/favicon.ico" />
	<!--[if lt IE 9]>
	<script type="text/javascript" src="__UU__/lib/lib/html5.js"></script>
	<script type="text/javascript" src="__UU__/lib/lib/respond.min.js"></script>
	<script type="text/javascript" src="__UU__/lib/lib/PIE_IE678.js"></script>
	<![endif]-->
	<link href="__UU__/css/H-ui.min.css" rel="stylesheet" type="text/css" />
	<link href="__UU__/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
	<link href="__UU__/lib/Hui-iconfont/1.0.6/iconfont.css" rel="stylesheet" type="text/css" />
	<link href="__UU__/css/style.css" rel="stylesheet" type="text/css" />
	<link href="__UU__/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
	<!--[if IE 6]>
	<script type="text/javascript" src="__UU__/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
	<script>DD_belatedPNG.fix('*');</script>
	<![endif]-->
	<title>基础信息</title>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 
		首页 <span class="c-gray en">&gt;</span> 
		商户信息 <span class="c-gray en">&gt;</span> 
		认证信息 
		<a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
			<i class="Hui-iconfont">&#xe68f;</i>
		</a>
	</nav>
<div class="pd-20">
	
	<!--未认证-->
	<div class="prove-brfore" <if condition="$va.bank neq null or $_POST neq null">style="display: none;"</if>>
		<p class="first"><i class="Hui-iconfont">&#xe6cd;</i> <strong>您还没有进行认证</strong></p>
		<p class="last">只有通过认证，您才能发起活动！</p>
		<div class="mt-20">
			<a href="javascript:void(0)" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 立即认证</a>
		</div>
	</div>
	<!--认证-->
	  <div class="prove-after" <if condition="$va.bank eq null and $_POST eq null">style="display: none;"</if>>
		<form action="__APP__/Account/save_shop_prove" class="form form-horizontal" method="post" id="form1">
		 <input type="hidden" value="{$va.id_card_photo}" name="id_card_photo" id="cardhidden"/>
		  <input type="hidden" value="{$va.business_license_photo}" name="business_license_photo" id="businesshidden"/>
			<!-- <div class="row cl">
				<label class="form-label col-2">认证类型:</label>
				<div class="formControls col-10 skin-minimal">
					<div class="radio-box">
			          	<input type="radio" id="sex-1" name="type" <if condition="$va.type eq '2'">checked="checked"</if> value="2" />
			          	<label for="sex-1">个人</label>
			        </div>
			        <div class="radio-box">
			          	<input type="radio" id="sex-2" name="type" value="1"  <if condition="$va.type eq '1'">checked="checked"</if>/>
			          	<label for="sex-2">企业</label>
			        </div>
					
				</div>
			</div> -->
			<div class="row cl">
			    <label for="" class="form-label col-2">商户类型:</label>
			    <div class="formControls col-10 skin-minimal">
				<span class="select-box inline">
					<select name="class_id" id="" class="select">
					  <volist name="classlist" id="co">
						<option value="{$co.id}" <if condition="$co['id'] eq $va['class_id']">selected="selected"</if>>{$co.name}</option>
					  </volist>
					</select>
				</span>
				</div>
			</div>
			<!-- <div class="row cl" >
				<label class="form-label col-2">身份证:</label>
				<div class="formControls col-3">
					<input type="text" name="id_card" id="" datatype="checkParity" errormsg="身份证错误" nullmsg="请输入身份证号码" class="input-text" value="{:R('Ckadmin/hide_name',array($va['id_card']))}" maxlength="18" style="width:250px"/>
				</div>
				<div class="formControls col-5">
					<div class="headimg">
					<if condition="$va.id_card_photo eq null">
					<img src="__UU__/img/logo.png" alt="" id="cardimg"/>
					<else/>
					<img src="{$va.id_card_photo}" alt="" id="cardimg"/>
					</if>
					</div>
					<if condition="($va.is_check eq '0' and $va.bank eq null) or $va.is_check eq '1' or $_POST neq null">
					    <button type="button" class="btn bnt-small btn-secondary-outline radius" onclick="layer_show('更改身份证','__APP__/Reuse/uploadimagesfile/type/3/page/2')">上传</button>
				    </if>
				</div>
			</div> -->
			   <div class="row cl type2">
				<label class="form-label col-2">营业执照:</label>
				<div class="formControls col-3">
					<input type="text" name="business_license" id="" class="input-text" value="{$va.business_license}" style="width:250px"/>
				</div>
				<div class="formControls col-5">
					<div class="headimg">
					<if condition="$va.business_license_photo eq null">
					<img src="__UU__/img/logo.png" alt="" id="businessimg"/>
					<else/>
					<img src="{$va.business_license_photo}" alt="" id="businessimg"/>
					</if>
					</div>
					<if condition="($va.is_check eq '0' and $va.bank eq null) or $va.is_check eq '1' or $_POST neq null">
					<button type="button" class="btn bnt-small btn-secondary-outline radius" onclick="layer_show('更改营业执照','__APP__/Reuse/uploadimagesfile/type/3/page/3')">上传</button>
				    </if>
				</div>
			</div>
			<!-- <div class="row cl">
				<label class="form-label col-2">商户名称:</label>
				<div class="formControls col-10">
					<input type="text" name="" id="" class="input-text" />
				</div>
			</div> -->
			<div class="row cl">
				<label class="form-label col-2">开户行:</label>
				<div class="formControls col-10">
					<input type="text" name="bank" id="" datatype="*" nullmsg="请输入开户行" class="input-text" value="{$va.bank}" style="width:250px"/>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">帐号:</label>
				<div class="formControls col-10">
					<input type="text" name="bank_account" id="" datatype="n" nullmsg="请输入银行卡账号" class="input-text" value="{:R('Ckadmin/hide_name',array($va['bank_account']))}" style="width:250px"/>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">开户人:</label>
				<div class="formControls col-10">
					<input type="text" name="bank_people" id="" datatype="*" nullmsg="请填写开户人姓名" class="input-text" value="{$va.bank_people}" style="width:250px"/>
					<p class="tang-tip">注：开户人需与认证材料中的姓名/名称一致</p>
				</div>
			</div>
			<!-- <div class="row cl">
				<label class="form-label col-2">财务人:</label>
				<div class="formControls col-10">
					<input type="text" name="finance_people" id="" datatype="*" nullmsg="请填写财务人姓名" class="input-text" value="{$va.finance_people}" style="width:200px"/>
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">财务联系电话:</label>
				<div class="formControls col-10">
					<input type="text" name="finance_phone" id="" datatype="m" nullmsg="请输入财务联系电话" class="input-text" value="{$va.finance_phone}" maxlength="13" style="width:200px"/>
				</div>
			</div> -->
			<if condition="$va.is_check eq '2'">
			<div class="row cl">
			    <div class="col-10 col-offset-2"><h3>你提交的认证信息：没有认证通过，失败原因:<span class="c-red">{$va.check_reason}</span>,请重新提交认证</h3></div>
			</div>
			</if>
			<div class="row cl">
			<if condition="$va.is_check eq '2' or ($va.is_check eq '0' and $va.bank eq null) and $_POST eq null">
				<div class="col-10 col-offset-2">
					<button class="btn btn-primary radius" id="snedf" type="submit">
						<i class="Hui-iconfont">&#xe632;</i> 提交审核
					</button>
				</div>
			<elseif condition="$va.is_check eq '0' and $va.bank neq null and $_POST eq null"/>
			    <div class="col-10 col-offset-2">
			        <h3>你已提交认证资料啦，我们会尽快为你审核，请耐心等候</h3>
			     </div>
			<elseif condition="$_POST eq null"/>
			    <div class="col-10 col-offset-2">
			        <h3>你提交的认证信息,已认证通过啦，赶快去发活动吧</h3>
			     </div>
			<else/>
			    <div class="col-10 col-offset-2">
					<button class="btn btn-primary radius" id="snedf" type="submit">
						<i class="Hui-iconfont">&#xe632;</i> 提交审核
					</button>
				</div>
			</if>
			</div>
		</form>
			
	</div>
</div>
<script type="text/javascript" src="__UU__/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__UU__/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="__UU__/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="__UU__/js/H-ui.js"></script>
<script type="text/javascript" src="__UU__/js/H-ui.admin.js"></script>
<script type="text/javascript" src="__UU__/lib/Validform/5.3.2/Validform.min.js"></script>	
<script type="text/javascript">
	$(function (){
		$('.skin-minimal input').iCheck({
			checkboxClass: 'icheckbox-blue',
			radioClass: 'iradio-blue',
			increaseArea: '20%'
		}).change(function (){
			if( this.value == 1 ){
				$('.type2').show();
			}else{
				$('.type2').hide();
			}
		});
	});
	function upLoadedsCallback(file, res){
		//layer.closeAll();
		//上传完所得回调
		if(res.code == 200){
			if(res.page == 1){
				$("#logoimg").attr("src",res.msg);
				$("#logohidden").val(res.msg);
			}else if(res.page == 2){
				$("#cardimg").attr("src",res.msg);
				$("#cardhidden").val(res.msg);
			}else if(res.page == 3){
				$("#businessimg").attr("src",res.msg);
				$("#businesshidden").val(res.msg);
			}
		}else{
			layer.alert(res.msg);
		}
		//console.log( res );
	}
	window.upLoadedsCallback = upLoadedsCallback;
	$(".radius").click(function(){
		$(".prove-after").show();
		$(".prove-brfore").hide();
	})
</script>
<script>
$('#form1').Validform({
		tiptype:3,
		ignoreHidden:true,
		datatype:{
			checkParity:function (gets, obj, curform, regxp){
				// 15转18位
				var changeFivteenToEighteen = function(card) {
					if (card.length == '15') {
						var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
						var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
						var cardTemp = 0, i;
						card = card.substr(0, 6) + '19' + card.substr(6, card.length - 6);
						for(i = 0; i < 17; i ++) {
							cardTemp += card.substr(i, 1) * arrInt[i];
						}
						card += arrCh[cardTemp % 11];
						return card;
					}
					return card;
				};
				if( gets ){
					var card = changeFivteenToEighteen(gets),len = card.length;
					if (len == '18') {
						var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
						var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
						var cardTemp = 0, i, valnum;
						for(i = 0; i < 17; i ++) {
							cardTemp += card.substr(i, 1) * arrInt[i];
						}
						valnum = arrCh[cardTemp % 11];
						if (valnum == card.substr(17, 1)) {
							return true;
						}
						return false;
					}
					return false;
				}
				return false;
			}	
		},
		tipSweep:true
	});
</script>
</body>
</html>
